PangoRectangle strong_pos, weak_pos;
PangoRectangle *cursor1, *cursor2;
GdkSeat *seat;
- GdkDevice *keyboard;
PangoDirection keyboard_direction;
PangoDirection direction2;
"gtk-cursor-aspect-ratio", &aspect_ratio,
NULL);
+ keyboard_direction = PANGO_DIRECTION_LTR;
seat = gdk_display_get_default_seat (priv->display);
if (seat)
- keyboard = gdk_seat_get_keyboard (seat);
- else
- keyboard = NULL;
- if (keyboard)
- keyboard_direction = gdk_device_get_direction (keyboard);
- else
- keyboard_direction = PANGO_DIRECTION_LTR;
+ {
+ GdkDevice *keyboard = gdk_seat_get_keyboard (seat);
+
+ if (keyboard)
+ keyboard_direction = gdk_device_get_direction (keyboard);
+ }
pango_layout_get_cursor_pos (layout, index, &strong_pos, &weak_pos);